

export default class NavTitle extends React.Component{
    render(){
        const {product}=this.props
        const {category,brandName,name}=product
        console.log("NavTitle",this);
        return(
            <div className={'detail-top-nav-title'}>
                <p
                    onClick={()=>{
                        $state.go({
                            stateName: "/searchProduct",
                            params: {
                                catId:category[0].id,
                                key:category[0].name
                            }
                        })
                    }}
                    className={'detail-top-nav-item1'}>{category[0].name}</p>
                <p className={'detail-top-nav-item-tri'}>{'>'}</p>
                <p
                    onClick={(e)=>{
                        e.stopPropagation()
                        $state.go({
                            stateName: "/searchProduct",
                            params: {
                                catId:category[1].id,
                                key:category[1].name
                            }
                        })
                    }}
                    className={'detail-top-nav-item1'}>{category[1].name}</p>
                <p className={'detail-top-nav-item-tri'}>{'>'}</p>
                <p className={'detail-top-nav-item2'}>{Filter.cutString(name,90,1) }</p>
            </div>
        )

    }
}
